﻿/*
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *如果数据库字段发生变化，请在代码生器重新生成此Model
 */
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SqlSugar;
using DGZImp.SysEntity;

namespace DGZImp.MdsProject.DomainModels
{
    [Entity(TableCnName = "销售订单", TableName = "Aps_SalesOrder", DBServer = "ServiceDbContext")]
    public partial class Aps_SalesOrder : ServiceEntity
    {
        /// <summary>
        ///ID
        /// </summary>
        [SugarColumn(IsPrimaryKey = true)]
        [Key]
        [Display(Name = "ID")]
        [Column(TypeName = "bigint")]
        [Required(AllowEmptyStrings = false)]
        public long SalesOrderId { get; set; }

        /// <summary>
        ///订单号
        /// </summary>
        [Display(Name = "订单号")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        [Editable(true)]
        public string OrderNo { get; set; }

        /// <summary>
        ///产品
        /// </summary>
        [Display(Name = "产品")]
        [Column(TypeName = "bigint")]
        [Editable(true)]
        public long? MaterialId { get; set; }

        /// <summary>
        ///订单类型
        /// </summary>
        [Display(Name = "订单类型")]
        [MaxLength(10)]
        [Column(TypeName = "nvarchar(10)")]
        [Editable(true)]
        public string OrderType { get; set; }

        /// <summary>
        ///下单日期
        /// </summary>
        [Display(Name = "下单日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? OrderDate { get; set; }

        /// <summary>
        ///要求交付日期
        /// </summary>
        [Display(Name = "要求交付日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? RequiredDate { get; set; }

        /// <summary>
        ///客户
        /// </summary>
        [Display(Name = "客户")]
        [Column(TypeName = "bigint")]
        [Editable(true)]
        public long? CustomerId { get; set; }

        /// <summary>
        ///客户订单号
        /// </summary>
        [Display(Name = "客户订单号")]
        [MaxLength(100)]
        [Column(TypeName = "nvarchar(100)")]
        [Editable(true)]
        public string CustomerOrderNo { get; set; }

        /// <summary>
        ///订单状态
        /// </summary>
        [Display(Name = "订单状态")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? OrderStatus { get; set; }

        /// <summary>
        ///订单进度
        /// </summary>
        [Display(Name = "订单进度")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? OrderProgress { get; set; }

        /// <summary>
        ///合同日期
        /// </summary>
        [Display(Name = "合同日期")]
        [Column(TypeName = "datetime")]
        [Editable(true)]
        public DateTime? ContractDate { get; set; }

        /// <summary>
        ///合同类型
        /// </summary>
        [Display(Name = "合同类型")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? ContractType { get; set; }

        /// <summary>
        ///销售经理
        /// </summary>
        [Display(Name = "销售经理")]
        [Column(TypeName = "bigint")]
        [Editable(true)]
        public long? SaleManagerId { get; set; }

        /// <summary>
        ///销售经理
        /// </summary>
        [Display(Name = "销售经理")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        [Editable(true)]
        public string SaleManagerName { get; set; }

        /// <summary>
        ///数量总计
        /// </summary>
        [Display(Name = "数量总计")]
        [DisplayFormat(DataFormatString = "20,4")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        public decimal? TotalQty { get; set; }

        /// <summary>
        ///余量
        /// </summary>
        [Display(Name = "余量")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? RemindQty { get; set; }

        /// <summary>
        ///费用类型
        /// </summary>
        [Display(Name = "费用类型")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? FeeType { get; set; }

        /// <summary>
        ///总金额
        /// </summary>
        [Display(Name = "总金额")]
        [DisplayFormat(DataFormatString = "10,6")]
        [Column(TypeName = "decimal")]
        [Editable(true)]
        public decimal? TotalFee { get; set; }

        /// <summary>
        ///余量金额
        /// </summary>
        [Display(Name = "余量金额")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? RemindFee { get; set; }

        /// <summary>
        ///币种
        /// </summary>
        [Display(Name = "币种")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? Currency { get; set; }

        /// <summary>
        ///订单优先级
        /// </summary>
        [Display(Name = "订单优先级")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? OrderPriority { get; set; }

        /// <summary>
        ///启用
        /// </summary>
        [Display(Name = "启用")]
        [Column(TypeName = "sbyte")]
        [Editable(true)]
        public sbyte? Enabled { get; set; }

        /// <summary>
        ///是否有效
        /// </summary>
        [Display(Name = "是否有效")]
        [Column(TypeName = "int")]
        public int? IsValid { get; set; }

        /// <summary>
        ///备注
        /// </summary>
        [Display(Name = "备注")]
        [MaxLength(512)]
        [Column(TypeName = "nvarchar(512)")]
        [Editable(true)]
        public string Remarks { get; set; }

        /// <summary>
        ///创建用户
        /// </summary>
        [Display(Name = "创建用户")]
        [Column(TypeName = "bigint")]
        public long? CreateId { get; set; }

        /// <summary>
        ///创建人
        /// </summary>
        [Display(Name = "创建人")]
        [MaxLength(50)]
        [Column(TypeName = "nvarchar(50)")]
        public string Creator { get; set; }

        /// <summary>
        ///创建时间
        /// </summary>
        [Display(Name = "创建时间")]
        [Column(TypeName = "datetime")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        ///修改用户
        /// </summary>
        [Display(Name = "修改用户")]
        [Column(TypeName = "bigint")]
        public long? ModifyId { get; set; }

        /// <summary>
        ///修改人
        /// </summary>
        [Display(Name = "修改人")]
        [MaxLength(30)]
        [Column(TypeName = "nvarchar(30)")]
        public string Modifier { get; set; }

        /// <summary>
        ///修改时间
        /// </summary>
        [Display(Name = "修改时间")]
        [Column(TypeName = "datetime")]
        public DateTime? ModifyTime { get; set; }


    }
}